<?
@session_start();
require_once("conn.php");
//print_r($language_th);
if($_SESSION["language"] == "TH"){
	$languages = $language_th;
}else{
	$languages = $language_mm;
}
?>
<style type="text/css" media="screen">
        <!--
        
        h2 {
            margin: 0;
        }

        .drawers-wrapper {
            position: relative;
            width: 188px;
            
        }

        .drawer {
            background:transparent url(images/sideboxlight_bg20070611.gif) repeat-y scroll 0pt;
            color:#76797C;
            font-size:11px;
            line-height:1.3em;
        }

        .boxcap {
            height:5px;
            left:0pt;
            position:absolute;
            width:100%;
            z-index:100;
            background:transparent url(images/sidenav_capbottom.png) no-repeat scroll 0%;
            margin-top:-5px;
        }

        .captop {
            background-image:url(images/box_188captop.png);
            bottom:auto;
            top:0pt;
            margin-top:0;
        }

        .drawers {
            margin-bottom:15px;
            color:#76797C;
            font-size:11px;
            line-height: 18px;
        }

        .drawers A {
            color:#666666;
            text-decoration:none;
            font-family:"Lucida Grande",Geneva,Arial,Verdana,sans-serif;
            font-size-adjust:none;
            font-style:normal;
            font-variant:normal;
            font-weight:normal;
        }

        .drawer li {
            border-bottom:1px solid #E5E5E5;
            line-height:16px;
            padding:6px 0pt;
        }

        UL {
            list-style: none;
            padding: 0;
        }

        UL.drawers {
            margin: 0;
        }

        .drawer-handle {
            background:#939393 url(images/slider_handlebg188.png) no-repeat scroll 0pt;
            color:#333333;
            cursor:default;
            font-size:12px;
            font-weight:normal;
            height:25px;
            line-height:25px;
            margin-bottom:0pt;
            text-indent:15px;
            width:100%;
        }

        .drawer-handle.open {
            background-color:#72839D;
            background-position:-188px 0pt;
            color:#FFFFFF;
        }

        .drawer UL {
            padding: 0 12px;
            padding-bottom:0pt;
        }

        .drawer-content UL {
            padding-top: 7px;
        }

        .drawer-content LI A {
            display:block;
            overflow:hidden;
        }

        .alldownloads li {
            border:0pt none;
            line-height:18px;
            padding:0pt;
        }
        -->
        </style>
<script src="scripts/jquery.dimensions.js" type="text/javascript"></script>
	<script src="scripts/jquery.accordion.js" type="text/javascript"></script>
<script type="text/javascript">
    <!--
    $(function () {
        $('ul.drawers').accordion({
            header: 'H2.drawer-handle',
            selectedClass: 'open',
            event: 'mouseover'
        });
    });
    //-->    
    </script>
<div class="drawers-wrapper">
	<div class="boxcap captop"></div>
    <ul class="drawers">
		<?
			if(checkAccess("0,1,2,3,4,5")){
		?>
        <li class="drawer">			
            <h2 class="drawer-handle open">Store</h2>
            <ul class="alldownloads">
            <?
				if(checkAccess("0")){
			?>
					<li><a href="#" onclick="Order();return false;"><?=$languages[0]?></a></li>
			<?
				}
				if(checkAccess("1")){
			?>
					<li><a href="#" onclick="acceptOrder();return false;"><?=$languages[1]?></a></li>
			<?
				}
				if(checkAccess("2")){
			?>
					<li><a href="#" onclick="sendOrderOffice();return false;"><?=$languages[2]?></a></li>
			<?
				}
				if(checkAccess("3,4,5")){
			?>
					<li><a href="#" onclick="Product_Main();return false;"><?=$languages[3]?></a></li>
					<li><a href="#" onclick="loadCatManage()">Category Manage</a></li>
					<li><a href="#" onclick="loadProManage()">Product Manage</a></li>
					<li><a href="#" onclick="loadUnitManage()">Unit Manage</a></li>
			<?
				}
			?>
            </ul>
        </li>
		<?
		}
		if(checkAccess("3,4,5")){
		?>
        <li class="drawer">
            <h2 class="drawer-handle">Logoshop</h2>
            <ul>
				<?
                if(checkAccess("3,4,5")){
				?>
				<li><a href="#" onclick="Logoshop_Main();return false;"><?=$languages[4]?></a></li>
				<?
				}
				if(checkAccess("3,4,5")){
				?>
				<li><a href="#" onclick="Logoshop_Report();return false;"><?=$languages[5]?></a></li>
				<?
				}
				?>
            </ul>
        </li>
		<?
		}
		if(checkAccess("6,7,8,9")){
		?>
        <li class="drawer">
            <h2 class="drawer-handle">Purchase</h2>
            <ul>
				<?
                if(checkAccess("6")){
				?>
					<li><a href="#" onclick="sendOrderToIsland();return false;"><?=$languages[7]?></a></li>
				<?
				}
				if(checkAccess("7")){
				?>
					<li><a href="#" onclick="orderNotAccept();return false;"><?=$languages[8]?></a></li>
				<?
				}
				if(checkAccess("8")){
				?>
					<li><a href="#" onclick="receiveFromIsland();return false;"><?=$languages[9]?></a></li>
				<?
				}
				if(checkAccess("9")){
				?>
					<li><a href="#" onclick="receiveUnknow();return false;">รายการของส่งเกิน</a></li>
				<?
				}
				?>
            </ul>
        </li>
		<?
			}
		?>
        <li class="drawer last">
            <h2 class="drawer-handle">System</h2>
            <ul>
			<?
                if(checkAccess("10")){
					?>
					<li><a href="#" onclick="History();return false;"><?=$languages[10]?></a></li>
					<?
				}
				if(checkAccess("11")){
					?>
					<li><a href="#" onclick="History_Receive();return false;"><?=$languages[11]?></a></li>
					<?
				}
				if(checkAccess("12")){
					?>
					<li><a href="#" onclick="editAccess();return false;">AccessList</a></li>
					<?
				}
					?>
					<li><a href="logout.php">Logout</a></li>
			</ul>
        </li>
    </ul>
	<div class="boxcap"></div>
</div>